<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <ul id="list">
    <li>练习1</li>
    <li>练习2</li>
    <li>练习3</li>
    <li>练习4</li>
    <li>练习5</li>
  </ul>
  <script>
    var list =document.getElementById("list")
    var lists = list.children
    list.onclick = function (e) {
      // e事件对象
      // e.target记录真正的事件源
      console.log(e.target);
      console.log(e);
      e.target.style.color = "red"
    }
  </script>
</body>
</html>